package User;

import Book.BookList;
import IOPeration.Ioperation;

public  abstract class User {
    private String name ;//名字为用户共有属性；
    public Ioperation[] ioperations;

   public abstract int menu();

    public User(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void doIOPeration(int choice, BookList booklist){
        ioperations[choice].work(booklist);
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                '}';
    }
}
